/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package vn.webapp.model;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import vn.webapp.dto.DataPage;

/**
 *
 * @author Tonytran
 */
@Entity
@Table(name = "courseteacherclass")
public class CourseTeacherClass implements Serializable {

    @Id
    @GeneratedValue
    @Column(name = "courseteacherclass_id")
    private int courseteacherclass_id;
    
    @Column(name = "courseteacher_id")
    private int courseteacher_id;
    
    @Column(name = "class_id")
    private int class_id;
    
    
    @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    @JoinColumn(name="class_id",  insertable = false, updatable = false, nullable = false, unique = true)
    public Classes classes;
    
    @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    @JoinColumn(name="courseteacher_id",  insertable = false, updatable = false, nullable = false, unique = true)
    public CoursingTimeTabling coursingTimeTabling;

    public int getCourseteacherclass_id() {
        return courseteacherclass_id;
    }

    public void setCourseteacherclass_id(int courseteacherclass_id) {
        this.courseteacherclass_id = courseteacherclass_id;
    }

    public int getCourseteacher_id() {
        return courseteacher_id;
    }

    public void setCourseteacher_id(int courseteacher_id) {
        this.courseteacher_id = courseteacher_id;
    }

    public int getClass_id() {
        return class_id;
    }

    public void setClass_id(int class_id) {
        this.class_id = class_id;
    }

    public Classes getClasses() {
        return classes;
    }

    public void setClasses(Classes classes) {
        this.classes = classes;
    }

    public CoursingTimeTabling getCoursingTimeTabling() {
        return coursingTimeTabling;
    }

    public void setCoursingTimeTabling(CoursingTimeTabling coursingTimeTabling) {
        this.coursingTimeTabling = coursingTimeTabling;
    }
}
